package pro;

/**
 * @Description: TODO
 * @author: muxiongxiong
 * @date: 2021年06月30日 18:32
 * 公众号：雄雄的小课堂
 * 博客：https://blog.csdn.net/qq_34137397
 */
public class Dog extends Pet {

    private String strain = "聪明的拉布拉多犬";

    public void play() {
        System.out.println("小狗在玩接飞盘的游戏");
    }

    public Dog(String name, int health, int love, String strain) {
        //super(name, health, love);
        //System.out.println("执行狗子类有参的构造方法");
        this.strain = strain;

    }

    public Dog() {
        System.out.println(getName());

        System.out.println("执行狗子类无参的构造方法");
    }

    public Dog(String strain) {
        this.strain = strain;
    }

    @Override
    public void eat() {
        super.setHealth(super.getHealth() + 3);
        System.out.println("狗狗吃饱啦，健康值增加3");
    }

    /**
     * 输出狗狗的信息
     */
    public void show() {
        //super.show();
        System.out.println("品种是：" + strain);
    }

    public String getStrain() {
        return strain;
    }

    public void setStrain(String strain) {
        this.strain = strain;
    }
}
